Outdated API Documentation for creating global event rules?

Creating a global event rule has changed from https://api.pagerduty.com/event_rules to https://api.pagerduty.com/rulesets//rules

https://developer.pagerduty.com/docs/rest-api-v2/global-event-rules-api/ is still pointing to create event rules with old API

When the old endpoint is tried, we get:

{
    "error": "Request is not acceptable: this rule or ruleset uses feature(s) that are only compatible with the V2 API. These invalid features could include: variables, extractions, suspends, or auto-remediation."
}

I’m pretty sure it’s still a valid API endpoint, for the time being, to be deprecated at some point in the near future. The error is essentially saying that you should use the new API endpoint instead to be able to use the latest features.

I can confirm it is not, our global event rules moved from “default” and got assigned a ruleset id.
When i was trying to add an event rule to our default global event rules with payload as mentioned in the documentation, i am encountering this error. This endpoint and payload worked until before last week (i guess something changed after PagerDuty summit).

Now i am having issues when trying to add rule to a ruleset and no documentation is available. API documentation refers every field as optional but when trying to post exactly what is present(without neglecting any fields in the example payload), i am getting HTTP 400 Bad Request. The response does not show proper message/response headers saying something is missing in the request.

Hi Surya,

Have you tried the same request using our new Rulesets API to post a new rule to the default ruleset? The error that you are getting means that someone has created a rule that uses one of our new Automation features like Paused Incident Notification, Dynamic Field Enrichment & Extraction or Event Triggered Webhooks in your accounts Global Event Rules.
https://developer.pagerduty.com/api-reference/reference/REST/openapiv3.json/paths/~1rulesets/get

We are planning on eventually deprecating our v1 Event Rules API sometime in early 2021 as the new Rulesets API is a superset of the old v1 API with a bunch of great new features. See the note at the top here: https://developer.pagerduty.com/docs/rest-api-v2/global-event-rules-api/

I hope this helps.